﻿<Window x:Class="RL.wPersonSelect"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Выбор сотрудника" Height="300" Width="600" Loaded="Window_Loaded">
    <Window.Resources>
        <CollectionViewSource x:Key="sourcePerson"/>
        <DataTemplate x:Key="cellDel">
            <CheckBox IsEnabled="False" IsChecked="{Binding Path=del}" />
        </DataTemplate>
        <DataTemplate x:Key="cellTabel">
            <TextBlock Text="{Binding Path=tabel}" />
        </DataTemplate>
        <DataTemplate x:Key="cellFIO">
            <TextBlock Text="{Binding Path=fio}" />
        </DataTemplate>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="30"/>
        </Grid.RowDefinitions>
        <ListView ItemsSource="{Binding Source={StaticResource sourcePerson}}" MouseDoubleClick="ListView_MouseDoubleClick" Name="listPerson" Grid.Row="0">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Вкл." Width="35" CellTemplate="{StaticResource cellDel}"/>
                    <GridViewColumn Header="Табельный" Width="100" CellTemplate="{StaticResource cellTabel}"/>
                    <GridViewColumn Header="Ф.И.О." Width="300" CellTemplate="{StaticResource cellFIO}"/>
                </GridView>
            </ListView.View>
        </ListView>
        <StackPanel Grid.Row="1" Name="stackPanel1" Orientation="Horizontal">
            <Button Content="OK" Height="23" Name="buttonOK" Width="75" IsDefault="True" Click="buttonOK_Click" />
            <Button Content="Отмена" Height="23" Name="buttonCancel" Width="75" IsCancel="True" Click="buttonCancel_Click" />
        </StackPanel>
    </Grid>
</Window>
